{include file="public/header" /}



<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.auto_set}</h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>

    <form id="auto_set_form" method="post" enctype="multipart/form-data" name="form1">
        <table class="ds-default-table">
            <tbody>
            <tr class="noborder">
                <td class="w150"><label for="order_auto_cancel_day">{$Think.lang.order_auto_cancel_day}:</label></td>
                <td class="vatop rowform">
                    <input id="order_auto_cancel_day" name="order_auto_cancel_day" value="{$list_config.order_auto_cancel_day|default=''}" type="text"> 天
                </td>
                <td class="vatop tips">未付款订单，自动取消订单的天数,自动取消订单时间设置区间为1-50数值</td>
            </tr>
            <tr class="noborder">
                <td class="w150"><label for="order_refund_time">{$Think.lang.order_refund_time}:</label></td>
                <td class="vatop rowform">
                    <input id="order_refund_time" name="order_refund_time" value="{$list_config.order_refund_time|default=''}" type="text"> 天
                </td>
                <td class="vatop tips">用户付款后可申请退款，申请退款时间设置区间为0-100数值</td>
            </tr>
            <tr class="noborder">
                <td class="w150"><label for="store_bill_cycle">{$Think.lang.store_bill_cycle}:</label></td>
                <td class="vatop rowform">
                    <input id="store_bill_cycle" name="store_bill_cycle" value="{$list_config.store_bill_cycle|default=''}" type="text"> 天
                </td>
                <td class="vatop tips">{$Think.lang.store_bill_cycle_tips}</td>
            </tr>
            </tbody>
            <tfoot>
            <tr class="tfoot">
                <td></td>
                <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
            </tr>
            </tfoot>
        </table>
    </form>
</div>


<script type="text/javascript">
    $(function() {
        $('#auto_set_form').validate({
            errorPlacement: function(error, element) {
                error.appendTo(element.parent().parent().find('td:last'));
            },
            rules: {
                order_auto_cancel_day: {
                    required: true,
                    number: true,
                    range : [1,50]
                },
                order_refund_time: {
                    required: true,
                    number: true,
                    range : [0,100]
                },
                store_bill_cycle: {
                    required: true,
                    number: true,
                    min : 7
                },
                
                
            },
            messages: {
                order_auto_cancel_day: {
                    required: '{$Think.lang.order_auto_cancel_day_required}',
                    number:'{$Think.lang.ds_sort_number}',
                    range:"{$Think.lang.ds_range_1_50}",
                },
                order_refund_time: {
                    required: '{$Think.lang.order_refund_time_required}',
                    number:'{$Think.lang.ds_sort_number}',
                    range:"{$Think.lang.ds_range_0_100}",
                },
                store_bill_cycle: {
                    required: '{$Think.lang.store_bill_cycle_required}',
                    number:'{$Think.lang.ds_sort_number}',
                    min:"{$Think.lang.ds_min_error}7",
                },
            }
        });
    });
</script>